﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Chatter.Actions
{
    class ActionFactory
    {
        private readonly List<IAction> _actions;
        public ActionFactory()
        {
            _actions = new List<IAction>();
            var discoveredFactories = (IEnumerable<IAction>)Assembly.GetExecutingAssembly().GetTypes()
            .Where( type => type.GetInterfaces().Any( intrfce => intrfce == typeof( IAction ) ) );

            this._actions.AddRange( discoveredFactories );
        }
        public IAction Create( Message message )
        {
            throw new NotImplementedException();
        }
    }
}
